﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace W.M.Materiel.Read.API
{
    public class FileNlog : IExceptionFilter
    {
        private readonly ILogger<FileNlog> _logger;

        public FileNlog(ILogger<FileNlog> logger)
        {
            _logger = logger;
        }

        public void OnException(ExceptionContext context)
        {
            _logger.LogError("异常信息:" + context.Exception.StackTrace);
        }
    }
}
